import server from "@/utils/request";

export const peList = (params) => {
  return server({
    method: "get",
    url: "/pe/list",
    params: params,
  });
};

export const pe_cate = () => {
  return server({
    method: "get",
    url: "/pe/categories",
  });
};

export const getPe = (params) => {
  return server({
    method: "get",
    url: `/pe/${id}`,
    params: params,
  });
};

export const delPe = (params) => {
  return server({
    method: "delete",
    url: `/pe/${params.id}`,
  });
};

export const addPe = (params) => {
  return server({
    method: "post",
    url: "/pe",
    data: params,
  });
};

export const peStatus = (params) => {
  return server({
    method: "post",
    url: `/pe/${params.id}/status`,
    data: {
      status: params.status,
    },
  });
};
